home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / code.cst / 00014_Script_PRIZE < prev    next >
Text File  |  1998-10-29  |  5KB  |  145 lines

  1. on enterFrame
  2.   global heading
  3.   global move
  4.   global updown
  5.   global objects
  6.   global silly
  7.   global silly2
  8.   global nomore
  9.   global CStop
  10.   global restoration
  11.   global castrestore
  12.   
  13.   if CStop = 1 then 
  14.     if the mouseH < the locH of sprite 30 then set the member of sprite 30 = "Left"
  15.     if the mouseH > the locH of sprite 30 then set the member of sprite 30 = "Right"
  16.     abort
  17.   end if
  18.   
  19.   if silly > 0 then abort
  20.   if silly2 > 0 then abort
  21.   
  22.   if the mouseV < 270 or the mouseH > the locH of sprite 30 - 20 and the mouseH < the locH of sprite 30 + 20 then
  23.     if heading = 1 then set the member of sprite 30 = "Left"
  24.     if heading = 2 then set the member of sprite 30 = "Right"
  25.     set move = 0
  26.   end if
  27.   
  28.   if the mouseH > the locH of sprite 30 + 19 and the mouseV > 270 then 
  29.     set the member of sprite 30 = "Walk Right"
  30.     set heading = 2
  31.     set move = 1
  32.     set the locH of sprite 30 = the locH of sprite 30 + 15
  33.   end if
  34.   
  35.   if the mouseH < the locH of sprite 30 - 19 and the mouseV > 270 then 
  36.     set the member of sprite 30 = "Walk Left"
  37.     set heading = 1
  38.     set move = 1
  39.     set the locH of sprite 30 = the locH of sprite 30 - 15
  40.   end if
  41.   
  42.   if the mouseV > the locV of sprite 30 and the mouseV < the locV of sprite 30 + 50 then 
  43.     if move = 0 and heading = 1 then set the member of sprite 30 = "Left"
  44.     if move = 0 and heading = 2 then set the member of sprite 30 = "Right"
  45.     set updown = 0
  46.   end if
  47.   
  48.   if the mouseV < the locV of sprite 30 then 
  49.     if the locV of sprite 30 > 300 then
  50.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  51.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  52.       set the locV of sprite 30 = the locV of sprite 30 - 5
  53.       set updown = 1
  54.     end if
  55.   end if
  56.   
  57.   if the mouseV > the locV of sprite 30 + 50 then 
  58.     if the locV of sprite 30 < 350 then
  59.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  60.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  61.       set the locV of sprite 30 = the locV of sprite 30 + 5
  62.       set updown = 1
  63.     end if
  64.   end if
  65.   
  66.   if the locH of sprite 30 > 340 and objects < 4 then 
  67.     if updown = 0 then set the member of sprite 30 = "Right"
  68.     set the locH of sprite 30 = 340
  69.   end if
  70.   
  71.   if the locH of sprite 30 > 600 then 
  72.     if updown = 0 then set the member of sprite 30 = "Right"
  73.     set the locH of sprite 30 = 600
  74.   end if
  75.   
  76.   if the locH of sprite 30 < 40 then 
  77.     set the locH of sprite 30 = 590
  78.     set the member of sprite 30 = "blank"
  79.     set nomore = 0
  80.     set castrestore = 0
  81.     set restoration = 0
  82.     puppetTransition 12, 1, 30, TRUE
  83.     go previous
  84.     set the member of sprite 30 = "Walk Left"
  85.   end if
  86.   
  87. end
  88.  
  89.  
  90. on rightMouseDown
  91.   global silly
  92.   global silly2
  93.   global heading
  94.   global objects
  95.   global CStop
  96.   if CStop = 1 then abort
  97.   if the mouseH > the locH of sprite 30 - 60 and the mouseH < the locH of sprite 30 + 60 and silly < 1 then 
  98.     if heading = 1 then 
  99.       set the locH of sprite 30 = the locH of sprite 30 + 16
  100.       set the locV of sprite 30 = the locV of sprite 30 - 14
  101.       set the member of sprite 30 = "backflipL"
  102.     end if
  103.     if heading = 2 then 
  104.       set the locH of sprite 30 = the locH of sprite 30 - 16
  105.       set the locV of sprite 30 = the locV of sprite 30 - 14
  106.       set the member of sprite 30 = "backflipR"
  107.     end if
  108.     set silly = 1
  109.   end if
  110.   
  111.   if silly2 < 1 and (the mouseH < the locH of sprite 30 - 60 or the mouseH > the locH of sprite 30 + 60) then
  112.     if the locH of sprite 30 < 280 or objects = 4 then
  113.       set silly2 = 1
  114.       set the locV of sprite 30 = the locV of sprite 30 - 15
  115.       if heading = 2 then set the member of sprite 30 = "cartwheelR"
  116.       if heading = 1 then set the member of sprite 30 = "cartwheelL"
  117.     end if
  118.   end if
  119.   
  120. end
  121.  
  122. on exitFrame
  123.   global silly
  124.   global silly2
  125.   global heading
  126.   if silly > 0 then set silly = silly + 1
  127.   if silly > 12 then
  128.     set silly = 0
  129.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 + 50
  130.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 - 50
  131.     set the locV of sprite 30 = the locV of sprite 30 + 14
  132.   end if
  133.   if silly2 > 0 then
  134.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 + 20
  135.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 - 20
  136.     set silly2 = silly2 + 1
  137.   end if
  138.   
  139.   if silly2 > 10 then 
  140.     set silly2 = 0
  141.     set the locV of sprite 30 = the locV of sprite 30 + 15
  142.   end if
  143.   
  144.   go the frame
  145. end